import request from '@/utils/request'

// 查询文章列表
// export function listArticle(query) {
//   return request({
//     url: '/system/article/list',
//     method: 'get',
//     params: query
//   })
// }

export function getAuthorList() { //获取所有作者（新增文章时使用）
  return request({
    url: '/busines/article/getAuthorList',
    method: 'get'
  })
}

// 查询文章列表（排除某ID）
// /busines/article/getAuthorList
export function listArticle(query) {
  return request({
    url: '/busines/article/list',
    method: 'get',
    params: query
  })
}

// 查询文章详细
export function getArticle(articleId) {
  return request({
    url: '/busines/article/' + articleId,
    method: 'get'
  })
}

// 新增文章
export function addArticle(data) {
  return request({
    url: '/busines/article',
    method: 'post',
    data: data
  })
}

// 修改文章
export function updateArticle(data) {
  return request({
    url: '/busines/article',
    method: 'put',
    data: data
  })
}

// 删除文章
export function delArticle(articleId) {
  return request({
    url: '/busines/article/' + articleId,
    method: 'delete'
  })
}

// 待审核授权信息列表
export function checkAuthorAuthInfoList(query) {
  return request({
    url: '/busines/authInstitution/pc/checkAuthorAuthInfoList',
    method: 'get',
    params: query
  })
}
//审核授权信息
export function updateAuthorAuthInfo(data) {
  return request({
    url: '/busines/authInstitution/pc/updateAuthorAuthInfo',
    method: 'put',
    data: data
  })
}












